#!/usr/bin/env python
#    DFT-AC  
#    ------------
#    Molecule:         N2 
#    Wave Function:    DFT / HCTH(ac) / aug-cc-pVDZ
#    Test Purpose:     Calculate excitation energies of N2 with an 
#                      asymptotically corrected (ac) functional. The 
#                      gradient-regulated ac is used. 
#                      Experimental IPs are used as input.                     

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Final DFT energy:',
      rel_tolerance = 1.0e-7)

f.add(from_string = 'Singlet electronic excitation energies',
      abs_tolerance = 1.0e-4,
      num_lines = 36,
      mask = [4])

test.run(['dft_ac_grac.dal'], ['N2_aug-cc-pVDZ.mol'], f={'out': f},
         accepted_errors=['not implemented for parallel calculations.'])

sys.exit(test.return_code)
